<?php

namespace Database\Seeders;

use Database\Factories\BlogFactory;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {

        $this->call([
            blogSeeder::class,
            userSeeder::class
        ]);
        $user = \App\Models\User::find(1);
        $user->name = 'zhangzhaokun';
        $user->email = '1107173365@qq.com';
        $user->password = bcrypt('admin888');
        $user->is_admin = 1;
        $user->save();
        $user = \App\Models\User::find(2);
        $user->name = 'zzk';
        $user->email = '1107173364@qq.com';
        $user->password = bcrypt('admin888');
        $user->is_admin = 0;
        $user->save();
    }
}
